package com.diqizu.servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.diqizu.dao.ProDuctType;
import com.diqizu.entity.ProType;

/**
 * localhost:8080/DiQiZu/TypeServlet?method=proType
 */
@WebServlet("/TypeServlet")
public class TypeServlet extends BaseServlet {
  
  
  public void proType(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
     ProDuctType type=new ProDuctType();
    ArrayList<ProType> typee = type.type();
    req.setAttribute("typee", typee);
    System.out.println(typee);
    
    
    
    req.getRequestDispatcher("productdetails.jsp").forward(req, resp);//跳转到你写的页面，产品页名字
    
    
    
    
    
    
    
    
    
    
  }
  
  
}